import Layout from '@/layout'
export default [
  {
    path: '/departments',
    component: Layout,
    meta: { name: 'departments' },
    children: [
      {
        path: '',
        name: 'departments',
        component: () => import('@/views/departments/index'),
        meta: { title: '组织架构', icon: 'tree' }
      }
    ]
  },
  {
    path: '/employees',
    component: Layout,
    meta: { name: 'employees' },
    children: [
      {
        path: '',
        name: 'employees',
        component: () => import('@/views/employees/index'),
        meta: { title: '员工', icon: 'people' }
      },
      {
        path: 'upload',
        component: () => import('@/views/employees/upload.vue'),
        hidden: true
      },
      {
        path: 'detail/:id',
        component: () => import('@/views/employees/detail.vue'),
        hidden: true
      }
    ]
  },
  {
    path: '/setting',
    component: Layout,
    meta: { name: 'setting' },
    children: [
      {
        path: '',
        name: 'employees',
        component: () => import('@/views/setting/index'),
        meta: { title: '公司设置', icon: 'setting' }
      }
    ]
  },
  {
    path: '/salarys',
    component: Layout,
    meta: { name: 'salarys' },
    children: [
      {
        path: '',
        name: 'employees',
        component: () => import('@/views/salarys/index'),
        meta: { title: '工资', icon: 'money' }
      }
    ]
  },
  {
    path: '/social',
    component: Layout,
    meta: { name: 'social' },
    children: [
      {
        path: '',
        name: 'social',
        component: () => import('@/views/social/index'),
        meta: { title: '社保', icon: 'table' }
      }
    ]
  },
  {
    path: '/attendances',
    component: Layout,
    meta: { name: 'attendances' },
    children: [
      {
        path: '',
        name: 'employees',
        component: () => import('@/views/attendances/index'),
        meta: { title: '考勤', icon: 'skill' }
      }
    ]
  },
  {
    path: '/approvals',
    component: Layout,
    meta: { name: 'approvals' },
    children: [
      {
        path: '',
        name: 'employees',
        component: () => import('@/views/approvals/index'),
        meta: { title: '审批', icon: 'tree-table' }
      }
    ]
  },
  {
    path: '/permission',
    component: Layout,
    meta: { name: 'permission' },
    children: [
      {
        path: '',
        name: 'employees',
        component: () => import('@/views/permission/index'),
        meta: { title: '权限管理', icon: 'lock' }
      }
    ]
  }
]
